package com.jeesite.modules.ic.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 流量卡Entity
 * @author 李寒冰
 * @version 2024-06-19
 */
@Table(name="ic_card", alias="a", label="流量卡信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="iccid", attrName="iccid", label="ICCID"),
		@Column(name="name", attrName="name", label="设备名称", queryType=QueryType.LIKE),
		@Column(name="card_status", attrName="cardStatus", label="卡状态 1正常 2停用 3静默期 4测试器 5已失效 6停机保号"),
		@Column(name="dev_status", attrName="devStatus", label="设备状态 0:离线；1:在线;"),
		@Column(name="taocan_name", attrName="taocanName", label="套餐名称", queryType=QueryType.LIKE),
		@Column(name="surplus_flow", attrName="surplusFlow", label="剩余流量"),
		@Column(name="use_flow", attrName="useFlow", label="已用流量"),
		@Column(name="total_flow", attrName="totalFlow", label="总流量"),
		@Column(name="begintime", attrName="begintime", label="开始时间", isUpdateForce=true),
		@Column(name="endtime", attrName="endtime", label="结束时间", isUpdateForce=true),
		@Column(name="user_id", attrName="userId", label="用户ID",isUpdateForce = true),
		@Column(name="status", attrName="status", label="status", isUpdate=false),
		@Column(name="real_status", attrName="realStatus", label="实名状态 1需要实名 2未实名 3不需要实名"),
		@Column(name="imei", attrName="imei", label=""),
		@Column(name="channal_id", attrName="channalId", label="渠道ID"),
		@Column(name="package_id", attrName="packageId", label="套餐ID"),
		@Column(name="card_type", attrName="cardType", label="卡类型 1单卡  2池卡"),
		@Column(name="beizhu", attrName="beizhu", label="备注"),
		@Column(name="active_time", attrName="activeTime", label="激活宽限期"),
		@Column(name="yunyingshang", attrName="yunyingshang", label="运营商"),
	}, orderBy="a.id DESC"
)
public class IcCard extends DataEntity<IcCard> {
	
	private static final long serialVersionUID = 1L;
	private String iccid;		// ICCID
	private String name;		// 设备名称
	private String cardStatus;		// 卡状态 1正常 2停用 3静默期 4测试器 5已失效
	private String devStatus;		// 设备状态
	private String taocanName;		// 套餐名称
	private String surplusFlow;		// 剩余流量
	private String useFlow;		// 已用流量
	private String totalFlow;		// 总流量
	private Date begintime;		// 开始时间
	private Date endtime;		// 结束时间
	private String userId;		// 用户ID
	private String realStatus;
	private String imei;
	private String channalId;
	private String packageId;
	private String cardType;
	private String beizhu;
	private String activeTime;
	private String yunyingshang;

	//联查字段
	private String userName;
	private String userMobile;
	private String packageName;
	private String channalName;
	private String companyName;

	//查询参数
	private Boolean open = false;
	private String keys;

	public String getYunyingshang() {
		return yunyingshang;
	}

	public void setYunyingshang(String yunyingshang) {
		this.yunyingshang = yunyingshang;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getChannalName() {
		return channalName;
	}

	public void setChannalName(String channalName) {
		this.channalName = channalName;
	}

	public String getPackageId() {
		return packageId;
	}

	public void setPackageId(String packageId) {
		this.packageId = packageId;
	}

	public String getCardType() {
		return cardType;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	public String getBeizhu() {
		return beizhu;
	}

	public void setBeizhu(String beizhu) {
		this.beizhu = beizhu;
	}

	public String getActiveTime() {
		return activeTime;
	}

	public void setActiveTime(String activeTime) {
		this.activeTime = activeTime;
	}

	public String getChannalId() {
		return channalId;
	}

	public void setChannalId(String channalId) {
		this.channalId = channalId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserMobile() {
		return userMobile;
	}

	public void setUserMobile(String userMobile) {
		this.userMobile = userMobile;
	}

	public String getKeys() {
		return keys;
	}

	public void setKeys(String keys) {
		this.keys = keys;
	}

	public Boolean getOpen() {
		return open;
	}

	public void setOpen(Boolean open) {
		this.open = open;
	}

	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public String getRealStatus() {
		return realStatus;
	}

	public void setRealStatus(String realStatus) {
		this.realStatus = realStatus;
	}

	public IcCard() {
		this(null);
	}
	
	public IcCard(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="ICCID长度不能超过 50 个字符")
	public String getIccid() {
		return iccid;
	}

	public void setIccid(String iccid) {
		this.iccid = iccid;
	}
	
	@Size(min=0, max=255, message="设备名称长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Size(min=0, max=255, message="卡状态 1正常 2停用 3静默期 4测试器 5已失效长度不能超过 255 个字符")
	public String getCardStatus() {
		return cardStatus;
	}

	public void setCardStatus(String cardStatus) {
		this.cardStatus = cardStatus;
	}
	
	@Size(min=0, max=255, message="设备状态长度不能超过 255 个字符")
	public String getDevStatus() {
		return devStatus;
	}

	public void setDevStatus(String devStatus) {
		this.devStatus = devStatus;
	}
	
	@Size(min=0, max=255, message="套餐名称长度不能超过 255 个字符")
	public String getTaocanName() {
		return taocanName;
	}

	public void setTaocanName(String taocanName) {
		this.taocanName = taocanName;
	}
	
	@Size(min=0, max=255, message="剩余流量长度不能超过 255 个字符")
	public String getSurplusFlow() {
		return surplusFlow;
	}

	public void setSurplusFlow(String surplusFlow) {
		this.surplusFlow = surplusFlow;
	}
	
	@Size(min=0, max=255, message="已用流量长度不能超过 255 个字符")
	public String getUseFlow() {
		return useFlow;
	}

	public void setUseFlow(String useFlow) {
		this.useFlow = useFlow;
	}
	
	@Size(min=0, max=255, message="总流量长度不能超过 255 个字符")
	public String getTotalFlow() {
		return totalFlow;
	}

	public void setTotalFlow(String totalFlow) {
		this.totalFlow = totalFlow;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getBegintime() {
		return begintime;
	}

	public void setBegintime(Date begintime) {
		this.begintime = begintime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getEndtime() {
		return endtime;
	}

	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}
	
	@Size(min=0, max=50, message="用户ID长度不能超过 50 个字符")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
}